package com.zmzncs.lmtc.module.shop.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmzncs.lmtc.module.shop.pojo.shop_goods.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.shop.pojo.shop_goods.GoodsDTO;
import com.zmzncs.lmtc.module.shop.pojo.shop_goods.GoodsSelectForm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 商户-商品 Mapper 接口
 * </p>
 *
 * @author 高博文
 * @since 2021-05-20
 */
@Repository
@Mapper
public interface GoodsDao extends BaseMapper<Goods> {

    /**条件分页查询商品信息*/
    IPage<GoodsDTO> getGoodsPage(Page page, @Param("form") GoodsSelectForm form);

    /**根据id查询商品信息*/
    List<GoodsDTO> getGoodsByShopId(Long shopId);

}
